package com.hntest.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 风控材料
 * 
 * @author Administrator
 * 
 */

public class UserFile extends BaseAuditDomain {

    private static final long serialVersionUID = 1L;
    private Integer id;

	public static final int STATE_NORMAL = 0;// 正常
	public static final int STATE_AUDIT = 1;// 审核通过
	public static final int STATE_REJECT = 2;// 审核拒绝

    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
    private Date startDate;//开始日期
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面输入日期时，可以根据该格式自动进行类型转换
    private Date endDate;//结束日期
	protected int state = -1;// 状态

	public String getStateDisplay() {
		switch (state) {
		case STATE_NORMAL:
			return "待审核";
		case STATE_AUDIT:
			return "审核通过";
		case STATE_REJECT:
			return "审核拒绝";
		default:
			return "";
		}
	}

	private String image;// 风控材料图片;
	private SystemDictionaryItem fileType;// 风控材料分类
	private int score;// 风控材料评分

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Override
    public int getState() {
        return state;
    }

    @Override
    public void setState(int state) {
        this.state = state;
    }

    public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public SystemDictionaryItem getFileType() {
		return fileType;
	}

	public void setFileType(SystemDictionaryItem fileType) {
		this.fileType = fileType;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "UserFile{" +
                "id=" + id +
                ", state=" + state +
                ", image='" + image + '\'' +
                ", fileType=" + fileType +
                ", score=" + score +
                '}';
    }
}
